package com.dong.mcd.dao;

import com.dong.mcd.model.SysRole;
import com.dong.mcd.model.SysUser;
import com.dong.mcd.model.SysUserExample;
import com.dong.mcd.param.UserParam;
import com.dong.mcd.pub.PagerMapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SysUserMapper extends PagerMapper {
    int countByExample(SysUserExample example);

    int deleteByExample(SysUserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    List<SysUser> selectByExample(SysUserExample example);

    SysUser selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") SysUser record, @Param("example") SysUserExample example);

    int updateByExample(@Param("record") SysUser record, @Param("example") SysUserExample example);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);
    
    void saveUserRole(UserParam param);
    
    void deleteUserRole(UserParam param);
    
    List<SysRole> getUserRoles(@Param("id")Integer userId);
}